package com.ylb.rent.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 import com.ylb.rent.dao.ApartmentImageMapper;
import  com.ylb.rent.entity.ApartmentImage;
import com.ylb.rent.service.IApartmentImageService;

/**
 * 公寓图片Service业务层处理
 * 
 * @author ylb
 * @date 2023-06-29
 */
@Service
public class ApartmentImageServiceImpl implements IApartmentImageService 
{
    @Autowired
    private ApartmentImageMapper apartmentImageMapper;

    /**
     * 查询公寓图片
     * 
     * @param id 公寓图片主键
     * @return 公寓图片
     */
    @Override
    public ApartmentImage selectApartmentImageById(Long id)
    {
        return apartmentImageMapper.selectApartmentImageById(id);
    }

    /**
     * 查询公寓图片列表
     * 
     * @param apartmentImage 公寓图片
     * @return 公寓图片
     */
    @Override
    public List<ApartmentImage> selectApartmentImageList(ApartmentImage apartmentImage)
    {
        return apartmentImageMapper.selectApartmentImageList(apartmentImage);
    }

    /**
     * 新增公寓图片
     * 
     * @param apartmentImage 公寓图片
     * @return 结果
     */
    @Override
    public int insertApartmentImage(ApartmentImage apartmentImage)
    {
        return apartmentImageMapper.insertApartmentImage(apartmentImage);
    }

    /**
     * 修改公寓图片
     * 
     * @param apartmentImage 公寓图片
     * @return 结果
     */
    @Override
    public int updateApartmentImage(ApartmentImage apartmentImage)
    {
        return apartmentImageMapper.updateApartmentImage(apartmentImage);
    }

    /**
     * 批量删除公寓图片
     * 
     * @param ids 需要删除的公寓图片主键
     * @return 结果
     */
    @Override
    public int deleteApartmentImageByIds(Long[] ids)
    {
        return apartmentImageMapper.deleteApartmentImageByIds(ids);
    }

    /**
     * 删除公寓图片信息
     * 
     * @param id 公寓图片主键
     * @return 结果
     */
    @Override
    public int deleteApartmentImageById(Long id)
    {
        return apartmentImageMapper.deleteApartmentImageById(id);
    }
}
